class STATS : public CONTROLLER {
    public:
        STATS();
        ~STATS();

        short jumpHeight;
        int health;
        int attack;
        int facing;
        int position;
        int sy;
        IMAGE * image;
        
        IMAGE * LoadImage(const short id);
        inline void SpriteAnimate();
 
    private:
        int manipulate;
        int march;
        int speed;
};

inline void STATS::SpriteAnimate()
{	
    //Moves the sprite in the row that it is in
    manipulate++; if(manipulate > 30) {march++; manipulate = 0;}
    
    oslSetImageTileSize(image,(march * 18),position,18,32);
    
    if (march >= 2) march = 0;
}

IMAGE * STATS::LoadImage(const short id)
{
    OSL_IMAGE * image = NULL;

    if(id == DEFAULT) image = oslLoadImageFilePNG((char*)"img/sprites/default.png", OSL_IN_RAM, OSL_PF_5551);
    else if(id == ZOMBIE) image = oslLoadImageFilePNG((char*)"img/sprites/zombie.png", OSL_IN_RAM, OSL_PF_5551);
    if(!image) oslFatalError("ERROR! Unable to set value to image!");
    
    return image;
}

STATS::STATS()
{
    return;
}

STATS::~STATS()
{
    return;
}
